<template>
  <el-select
      clearable
      filterable
      placeholder="请选择作业类别"
      class="ele-fluid"
      :value="value"
      @change="change">
    <el-option v-for="item in option" :key="item.id" :label="item.name" :value="item.id"/>
  </el-select>
</template>

<script>
export default {
  props: {
    value: Number,
  },
  model: {
    prop: 'value',
    event: 'change',
  },
  data: function () {
    return {
      option: [],
      loading: false,
    };
  },
  mounted() {
    this.option = [
      {name: '异常', id: 1},
      {name: '正常', id: 2},
      {name: '已处罚', id: 3}
    ]
  },
  methods: {
    change(val) {
      this.$emit('change', val);
    }
  },
};
</script>